set_project("kantu")
set_version("0.1.0")
set_warnings("all")
add_rules("mode.debug", "mode.release")
add_defines("_CRT_SECURE_NO_WARNINGS")
includes("@builtin/xpack")
includes("vendor/LCUI/xmake.lua")

target("kantu")
    if is_plat("windows") then
        add_rules("win.sdk.application")
        add_files("version.rc")
    end
    if is_mode("debug") then
        add_defines("DEBUG")
    end
    set_configdir("include")
    set_rundir("dist")
    add_deps("lcui")
    set_kind("binary")
    add_files("src/**.c")

xpack("kantu")
    set_title("kantu")
    set_description("An image viewer")
    set_author("i@lc-soft.io")
    set_maintainer("i@lc-soft.io")
    set_copyright("Copyright (C) 2014-present, Liu Chao <i@lc-soft.io>")
    set_licensefile("./LICENSE.txt")
    set_formats("nsis", "zip")
    set_basename("kantu-v$(version)")
    add_installfiles("dist/(**)")
    add_targets("kantu")
    set_bindir("./")
    set_iconfile("logo.ico")
